|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Functions | |
| void | main (void) |
Variables | |
| int16_t | multiplier = 0x1234 |
| int16_t | operand = -6578 |
| int64_t | Result |
| void main | ( | void | ) |
Definition at line 68 of file mpy32_ex3_16bitSignedMultiply.c.
References __no_operation(), multiplier, operand, and Result.
| int16_t multiplier = 0x1234 |
MPY - 16x16 Signed Multiply
Hardware multiplier is used to multiply two numbers. The calculation is automatically initiated after the second operand is loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is negative, SUMEXT = 0 otherwise. Result is also stored as Result variable.
ACLK = 32.768kHz, MCLK = SMCLK = default DCO
| / | | |
|---|---|
| – | RST |
| | | |
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 64 of file mpy32_ex3_16bitSignedMultiply.c.
| int16_t operand = -6578 |
Definition at line 65 of file mpy32_ex3_16bitSignedMultiply.c.
| int64_t Result |
Definition at line 66 of file mpy32_ex3_16bitSignedMultiply.c.